package com.example.demo.pojo;

public class BSResult<T> {


    private Integer code;
    private String message;
    private T data;


    public BSResult(T data){
        this.code=200;
        this.data=data;
    }


    public BSResult(Integer code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "BSResult{" +
                "code=" + code +
                ", message='" + message + '\'' +
                ", data=" + data +
                '}';
    }


    public static void main(String[] args) {
        BSResult<String> stringBSResult=new BSResult<>(200,"d","sf");
        BSResult b=stringBSResult;

        System.out.println(b.toString());



    }

}
